<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <link href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css" rel="stylesheet">
</head>
<body>
  <div id="app">
    <button @click='show = !show'>切换</button>
    <!-- 通过自定义过渡类名设置,给组件添加第三方动画库的类名效果 -->
    <transition
     enter-active-class='animate__bounceIn'
     leave-active-class='animate__bounceOut'
     >
      <!-- 必须给要使用动画的元素设置基础类名 -->
      <p v-if="show" class="animate_animated">hello world</p>
    </transition>
  </div>
</body>
<script src="../lib/vue.js"></script>
<script>
   new Vue({
    el: "#app",
    data: {
      show: true
    }
  })
</script>
</html>